package com.intretech.umsin.pay.service.impl;

import com.intretech.umsin.pay.service.PayMentService;
import com.intretech.umsin.pay.vo.AlipayVo;
import org.springframework.stereotype.Service;

import java.util.UUID;

/**
 * @version V1.0
 * @ClassName: PayMentServiceImpl
 * @Description: 功能描述
 * @author: 李启联
 * @date: 2022-8-12 9:44
 * @Copyright: Copyright (c) 2022
 */

@Service
public class PayMentServiceImpl implements PayMentService {

    /**
     * 根据设备创建支付宝付款请求
     *
     * @param machineId 设备标识
     * @return 付款请求对象
     */
    @Override
    public AlipayVo getAlipay(String machineId) {
        //模拟创建订单
        String orderNo = UUID.randomUUID().toString().replaceAll("-","");
        AlipayVo vo = new AlipayVo(machineId+orderNo,"测试支付","100.00","这是个测试数据","5m");
        return vo;
    }
}